package view;

import java.awt.Color;
import java.awt.Font;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;

/**.
 * View used to said that movies is currently imported
 * @author jaubertbenjamin
 *
 */
public class ImportedMoviesView extends JFrame {

        /**.
         * serial ID
         */
        private static final long serialVersionUID = -836043880103557622L;

        /**.
         * content Panel
         */
        private JPanel contentPane;

        /**.
         * Progress Bar
         */
        private JProgressBar progressBar;

        /**.
         * label
         */
        private JLabel lblPleaseWaitWhile;

        /**.
         * Main Constructor of the view
         */
        public ImportedMoviesView() {
                setResizable(false);
                setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                setBounds(100, 100, 450, 125);
                this.setUndecorated(true);
                contentPane = new JPanel();
                contentPane.setBackground(Color.GRAY);
                contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
                setContentPane(contentPane);
                contentPane.setLayout(null);

                lblPleaseWaitWhile = new JLabel("Please wait while the movies are imported !");
                lblPleaseWaitWhile.setHorizontalAlignment(SwingConstants.CENTER);
                lblPleaseWaitWhile.setFont(new Font("Lucida Grande", Font.PLAIN, 15));
                lblPleaseWaitWhile.setBounds(18, 26, 399, 16);
                contentPane.add(lblPleaseWaitWhile);

                progressBar = new JProgressBar();
                progressBar.setIndeterminate(true);
                progressBar.setBounds(142, 71, 146, 20);
                contentPane.add(progressBar);
                setVisible(true);
                this.setLocationRelativeTo(null);
        }
}
